package com.truyen.persistence.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the chapter_tmp_truyen_tinh_cam database table.
 * 
 */
@Entity
@Table(name="chapter_tmp_truyen_tinh_cam")
public class ChapterTmpTruyenTinhCam implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(unique=true, nullable=false)
	private long id;

	@Column(nullable=false, length=255)
	private String alias;

	private float chapterNumber;

	@Column(nullable=false, length=255)
	private String name;

	//bi-directional one-to-one association to ChapterTruyenTinhCam
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id", nullable=false, insertable=false, updatable=false)
	private ChapterTruyenTinhCam chapterTruyenTinhCam;

	//bi-directional many-to-one association to TruyenTinhCam
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="truyenTinhCamItem", nullable=false)
	private TruyenTinhCam truyenTinhCam;

	public ChapterTmpTruyenTinhCam() {
	}

	public ChapterTmpTruyenTinhCam(long id2, String name2,
			String alias2, float chapterNumber2,
			TruyenTinhCam truyen) {
		this.id=id2;
		this.name=name2;
		this.alias=alias2;
		this.chapterNumber=chapterNumber2;
		this.truyenTinhCam=truyen;
	}

	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getAlias() {
		return this.alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public float getChapterNumber() {
		return this.chapterNumber;
	}

	public void setChapterNumber(float chapterNumber) {
		this.chapterNumber = chapterNumber;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ChapterTruyenTinhCam getChapterTruyenTinhCam() {
		return this.chapterTruyenTinhCam;
	}

	public void setChapterTruyenTinhCam(ChapterTruyenTinhCam chapterTruyenTinhCam) {
		this.chapterTruyenTinhCam = chapterTruyenTinhCam;
	}

	public TruyenTinhCam getTruyenTinhCam() {
		return this.truyenTinhCam;
	}

	public void setTruyenTinhCam(TruyenTinhCam truyenTinhCam) {
		this.truyenTinhCam = truyenTinhCam;
	}

}